//
//  ViewController.m
//  DrawRect
//
//  Created by MyMac on 15/9/14.
//  Copyright (c) 2015年 tongfang. All rights reserved.
//

#import "ViewController.h"
#import "DrawRect.h"
#import "btnView.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    DrawRect*view=[[DrawRect alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];
    view.backgroundColor=[UIColor redColor];
    UITapGestureRecognizer*tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(click)];
    [view addGestureRecognizer:tap];
    [self.view addSubview:view];
    
    btnView*btnv=[[btnView alloc]initWithFrame:CGRectMake(200, 200, 50, 50)];
    btnv.backgroundColor=[UIColor yellowColor];
    [btnv addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btnv];
    
    
}
-(void)btnClick
{
    NSLog(@"好222222好");


}
-(void)click
{
    NSLog(@"好好");



}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
